/**
* gtk_list_base_size_allocate_child:
* @self: The listbase
- * @child:
+ * @child: The child
* @x: top left coordinate in the across direction
* @y: top right coordinate in the along direction
* @width: size in the across direction
if (gtk_list_base_get_orientation (GTK_LIST_BASE (self)) == GTK_ORIENTATION_VERTICAL)
{
- child_allocation.x = x;
- child_allocation.y = y;
- child_allocation.width = width;
- child_allocation.height = height;
- }
- else if (_gtk_widget_get_direction (GTK_WIDGET (self)) == GTK_TEXT_DIR_LTR)
- {
- child_allocation.x = y;
- child_allocation.y = x;
- child_allocation.width = height;
- child_allocation.height = width;
+ if (_gtk_widget_get_direction (GTK_WIDGET (self)) == GTK_TEXT_DIR_LTR)
+ {
+ child_allocation.x = x;
+ child_allocation.y = y;
+ child_allocation.width = width;
+ child_allocation.height = height;
+ }
+ else
+ {
+ int mirror_point = gtk_widget_get_width (GTK_WIDGET (self));
+
+ child_allocation.x = mirror_point - x - width;
+ child_allocation.y = y;
+ child_allocation.width = width;
+ child_allocation.height = height;
+ }
}
else
{
- int mirror_point = gtk_widget_get_width (GTK_WIDGET (self));
+ if (_gtk_widget_get_direction (GTK_WIDGET (self)) == GTK_TEXT_DIR_LTR)
+ {
+ child_allocation.x = y;
+ child_allocation.y = x;
+ child_allocation.width = height;
+ child_allocation.height = width;
+ }
+ else
+ {
+ int mirror_point = gtk_widget_get_width (GTK_WIDGET (self));
- child_allocation.x = mirror_point - y - height;
- child_allocation.y = x;
- child_allocation.width = height;
- child_allocation.height = width;
+ child_allocation.x = mirror_point - y - height;
+ child_allocation.y = x;
+ child_allocation.width = height;
+ child_allocation.height = width;
+ }
}
gtk_widget_size_allocate (child, &child_allocation, -1);